package org.xbzheng.restful_study.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.xbzheng.restful_study.dao.RoleDao;
import org.xbzheng.restful_study.model.Role;

import java.util.List;

/**
 * Created by hun on 2016-11-12.
 */
@Service
public class RoleService {
    @Autowired
    private RoleDao roleDao;

    public List<Role> getRoles(){
        return roleDao.findAll();
    }

    public void save(Role role){
        roleDao.save(role);
    }
}
